/**
 * Created by licc on 29/10/2020.
 * 与子应用通信都用这个vuex，弃用qiankun自带的initGlobalState
 */
import { VuexModule, Module, Mutation, Action, getModule } from 'vuex-module-decorators'
import store from '@/store'
export interface SheetSummaryState {
  sheetSummaryData: any
}

@Module({ dynamic: true, name: 'sheetSummary', store, namespaced: false })
class SheetSummary extends VuexModule implements SheetSummaryState {
  public sheetSummaryData = {
    applicationId: null,
    worksheetId: ''
  }

  get getSheetSummaryData () {
    return this.sheetSummaryData
  }

  @Mutation
  public setSheetSummaryData (data: any) {
    this.sheetSummaryData = data
  }
}

export const SheetSummaryModule = getModule(SheetSummary)
